POV-Ray : Newsgroups : povray.advanced-users : circles in circles : circles in circles Server Time
2 Nov 2024 15:27:45 EDT (-0400)
  circles in circles  
From: Rainer Mager
Date: 26 May 1999 05:03:12
Message: <374baac0.0@news.povray.org>
Hi all,

    I'm trying to make a simple cable macro. The macro is supposed to make a
straight cable from 2 given end points such that the cable is made up of a
number of given strands twisted smothly around one another. Also given to
the macro is the radius of the cable as a whole and the twistiness of the
strands. In use it looks like (will look like) the cable is solid even
though it is actuall a hollow tube. A very small image is attached showing
what a 7 strand cable should look like when viewed from the end (an unusual
place to view such a cable).
    The problem that I am having is calculating the radius of the small
inner strands. In the attached picture the inner strands are yellow and the
outer red is simply for reference and won't show up in a real cable. In the
image I guessed the yellow radii by trial and error just to make the
picture. In real use this needs to be an automatic calculation.

    I've been working on the math a lot and finally derived this formula:

z^2 = -8r^4 - (4R + 10)r^3 + (5R + 12R^2)r^2 - 6R^3r + R^4

Where z is a known constant that is related to the number of strands and R
is the given radius of the large red circle and r is the radius to be
calcuated. The problem is solving the 4th order polynomial. I also solved
the problem for the case where there are 3 strands only and got this:

r = R / (2 + ((2 - sqrt(3)) / sqrt(3)))

The problem with this is generalizing it to more strands.

Once I get the radius I need the part of twisting the strands is easy.

Any ideas?


Thanks,

--Rainer


Post a reply to this message


Attachments:
Download '7.jpg' (4 KB)

Preview of image '7.jpg'
7.jpg


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.